package face.yuque;

/**
 * @author spf
 * @date 2024/12/12
 * @time 21:23
 */
//斐波那契数列
//方法一：暴力递归
public class FBNQ {
    public static void main(String[] args) {
        System.out.println(fbnq(10));
    }

    private static int fbnq(int n) {
        if (n == 0) {
            return 0;
        }
        if (n == 1) {
            return 1;
        }
        return fbnq(n - 1) + fbnq(n - 2);
    }
}
